{include file="public/header"}
<body>
<fieldset class="layui-elem-field">
    <legend>活动列表</legend>
    <div class="layui-field-box">

        <table class="layui-table" lay-even>
            <thead>
            <tr>
                <th>#</th>
                <th>活动标题</th>
                <th>活动金额</th>
                <th>活动人数</th>
                <th>是否支付</th>
                <th>是否审核</th>
                <th>发起人</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody  id="searchContent">
                {volist name="list" id="vo"}
                    <tr>
                        <td>{$i}</td>
                        <td>{$vo['title']}</td>
                        <td>{$vo['all_money_num']}</td>
                        <td>{$vo['person']}</td>
                        <td>{$vo['order']['statusname']}</td>
                        <td>{$vo['statusname']}</td>
                        <td>{$vo['user']['name']}</td>
                        <td>
                            {if $vo['status'] == 1}
                             <span  class="layui-btn layui-default">已审核</span>
                            {else /} 
                            <span onclick="pass('{$vo["id"]}')" class="layui-btn">审核</span>
                            {/if}
                            
                            <a href="{:url('activityshow',['id'=>$vo.id])}"><span  class="layui-btn">查看</span></a>
                        </td>
                    </tr>
                {/volist}
            </tbody>
        </table>
        <div>{$list->render()}</div>
    </div>
</fieldset>


{include file="public/footer"}
<script>

    function pass(id){
        var params  = {
            url : "{:url('pass')}",
            data: {"id":id},
            type: 'post',
            sCallback:function(res){
                dialog.success(res.msg,location.reload());
            },
        };
        common.request(params);
      
    }
       
  
</script>
</body>
</html>